#ifndef EPIPLON_H_
#define EPIPLON_H_

#include <iostream>
#include <fstream>
#include <sstream>
#include <map>
#include <string>
#include <list>
#include <vector>


//#include "../WellSizedVector2.h"
//#include "../PositionVector.h"


using namespace std;

class Epiplon{
	
public:
	Epiplon();
	~Epiplon();
	void loadFastHTML();
	void loadFastTable();
	void loadLinksToIDTable();
	void status();

//	void getLinkFromID(uint docId, string & link);
//	void getWellSizedVectorFromID(unsigned long long wordID, vector<WellSizedVector2> & list_WSV);
	
	uint getIDFromLink(unsigned long long id){
		return fastLinkToID_all[id];
	};

//	unsigned long getFrequencyFromID(unsigned long long wordID);
	
private:
	
	string fileName(string base, uint id);
	void getSuperDocFromWord(unsigned long long wordID, uint & id1, uint & id2);
//	void DecodeString(WellSizedVector2 &_wsv, unsigned long long &_id, string _line);
	void createSuperTablesLimits(void);
	
	map<uint, uint> fastHTMLTable_1;
	map<uint, uint> fastHTMLTable_2;

	map<unsigned long long, uint> fastLinkToID_all;

	map<unsigned long long, uint> fastTable_1;
	map<unsigned long long, uint> fastTable_2;

	ifstream htmlTable_1;
	ifstream htmlTable_2;
	
	uint MaxSuperMapsFile_1;
	uint MaxSuperMapsFile_2;
	
	ifstream SuperMapsFile_1[32]; //	/work/superMaps_1 : 32 documentos
	ifstream SuperMapsFile_2[33]; //	/work/superMaps_2 : 33 documentos
	
	unsigned long long vectosSuperLimits_1[32];
	unsigned long long vectosSuperLimits_2[33];
	
};



#endif /*EPIPLON_H_*/
